package com.jiker.keju;

public class TaxiSeed {

    private String [] mData = null;

    public TaxiSeed(String path) {
        String contents = new FileManager().readFile("src/main/resources/" + path);
        if (contents != null && !contents.isEmpty()) {
            mData = contents.split("\n");
        }
    }

    public String outputResult(){
        StringBuilder result = new StringBuilder();
        if (mData == null) {
            return "";
        }
        for (String item : mData) {
            result.append(new Calculation().calc(item)).append("\n");
        }
        return result.toString();
    }
}
